/**
 * Created by Administrator on 17-6-5.
 */
//地址函数-------------如需更改地址请在实例更改

//获 取 图 片
var ss={
    "start":"1",
    "offset":"28",
    "auth_type":1
};
//  yy 和  ss 头像 和新会员之间的区分
var yy={
    "start":"1",
    "offset":"28",
    "auth_type":2
};
function Huoqu(obj1,url,modlID,touXrongNA,listt,classitem,postion){
    $(obj1).on("click",function(){
        $(touXrongNA).html(null);$(".page-fen>ul").html(null); //初始化 Shencha
        $(".Nv_biaoti").text($(this).text());
        $.ajax({
            type:"POST",
            url:url,
            dataType:"json",
            data:postion,
            success:function(data){
                $div="";
                console.log(data);
                if(data.data.recordsTotal==0){
                    $(".nav-content").html("<h1>暂无数据</h1>").addClass("text-center");
                    return
                };
                //女生头像
                if(listt=="girlNew"){

                    $(".nav-content").removeClass("text-center");
                    var head=data.data.girlHead;
                    rr(data,".nav-content",head);     getPage();
                };
                //男生头像
                if(listt=="list1"){

                    $(".nav-content").removeClass("text-center");
                    var head=data.data.boyHead;
                    rr(data,".nav-content",head);     getPage();
                };
                //-------------------分页   （后台分页）
                //点击之后 调用的AJAX 重置页面内容
                function ajsx(postion,url){
                    $.ajax({
                        type: 'POST',
                        url: url,
                        data:postion,
                        success: function(data){
                            var head;
                            if(listt=="girlNew"){
                                head=data.data.girlHead;
                            }else{
                                head=data.data.boyHead;
                            }

                            rr(data,".nav-content",head); getPage();
                        },
                        dataType: "json"
                    });
                }
                function getPage(){
                    $(".page-fen>ul").html("");
                    var totality=data.data.recordsTotal;//模仿后台总条数
                    var pagetoal=Math.ceil(totality/postion.offset);//向上取整
                    var li;
                    for(var i=1;i<pagetoal+1;i++){  //动态创建页数
                        li+="<li><a href='#' class='btn'>"+i+"</a></li>"
                    };
                    $(".page-fen>ul").append($(li));//放进容器;
                }
                function rr(data,obj2,str3){
                    $(obj2).html("");
                    var  list="";
                    if(listt=="girlNew"){
                        for(var j=0;j<str3.length;j++){
                            list+="<a href='Javascript:;' class='"+classitem+"' data-toggle='modal' data-target='"+modlID+"' data-whatever='张三'>" +
                                "<img class='touXian'  src='"+str3[j].head_img+"' alt='图片地址有误' /><span  style='display: none'>"+str3[j].girl_id+"</span></a>";
                        };
                    }else{
                        for(var j=0;j<str3.length;j++){
                            list+="<a href='Javascript:;' class='"+classitem+"' data-toggle='modal' data-target='"+modlID+"' data-whatever='张三'>" +
                                "<img class='touXian'  src='"+str3[j].head_img+"' alt='图片地址有误' /><span  style='display: none'>"+str3[j].boy_id+"</span></a>";
                        };
                    }

                    $(obj2).append(list);//放进容器
                };
                $(".page-fen .btn").unbind("click").bind("click",function() {
                    var  ind=$(this).text();
                    var tthis=$(this);
                    $(this).parent("li").addClass("active");
                    $(this).parent("li").siblings().removeClass("active");
                    postion.start=(ind-1)*postion.offset+1;
                    ajsx(postion,url);  getPage();
                    $(".page-fen").ajaxComplete(function(){
                        //tthis.css({"background":"red","color":"white"}).siblings().css("background","#E8E8E8");
                        postion.start=1;
                    });
                });
                function getZong(url,obj2){
                    $.ajax({
                        type: 'POST',
                        url: url,
                        data:postion,
                        success: function(data){
                            var totality=data.data.recordsTotal;//后台总条数
                            var pagetoal=Math.ceil(totality/postion.offset);//向上取整
                            var li;
                            for(var i=1;i<pagetoal+1;i++){  //动态创建页数
                                li+="<li><a href='#' class='btn'>"+i+"</a></li>"
                            };
                            $(obj2).append($(li));//放进容器;
                        }
                    })
                }
            },
            error:function(){
                alert("请求失败");
            }
        })
    })
};

//女生图片获取
Huoqu(".NvshengShencha",address1+"/admin/GirlReview/getGirlHead","#myModal38",".nav-content","girlNew","XtouXiang6",ss);   //新女生 用户 获取

Huoqu(".NtouxianggenGgai",address1+"/admin/GirlReview/getGirlHead","#myModal32",".nav-content","girlNew","XtouXiang0",yy);            //新女生 头像 获取
Huoqu(".NvshenXC",address1+"/admin/GirlReview/getNewPhoto","#myModal33",".nav-content","girlNew","XtouXiang1",ss);            //新女生 相册 获取
Huoqu(".NvshenTX",address1+"/admin/GirlReview/getNewVideo","#myModal34",".nav-content","girlNew","XtouXiang2",ss);            //新女生 视频 获取
Huoqu(".NvshenYY",address1+"/admin/GirlReview/getNewVoice","#myModal35",".nav-content","girlNew","XtouXiang3",ss);            //新女生 语音 获取
Huoqu(".NvshenSF",address1+"/admin/GirlReview/getNewIdCard","#myModal36",".nav-content","girlNew","XtouXiang4",ss);            //新女生 身份证 获取
Huoqu(".NvshenZY",address1+"/admin/girlProfessionAuth/getGirlNewModel","#myModalNv-ZY",".nav-content","girlNew","XtouXiang5",ss);            //新女生 职业--模特 获取
Huoqu(".NvshenZY-WH",address1+"/admin/GirlProfessionAuth/getGirlNewPlatform","#myModalNv-WH",".nav-content","girlNew","XtouXiang7",ss);            //新女生 职业--网红 获取
Huoqu(".NvshenZY-BL",address1+"/admin/GirlProfessionAuth/getNewProfessi","#myModalNv-BL",".nav-content","girlNew","XtouXiang8",ss);            //新女生 职业--白领 获取


//男生图片获取
Huoqu(".NanshengShencha",address1+"/admin/BoyReview/getBoyHead","#myModal78",".nav-content2","list1","NXtouXiang",ss);            //新男生 用户 获取
//Huoqu(".NanshentouxiangGengai","test.json","#myModal100",".nav-content2","list1","NXtouXiang0",ss);            //新女生 头像 获取
Huoqu(".NanshenXC",address1+"/admin/BoyReview/getNewPhoto","#myModal101",".nav-content2","list1","NXtouXiang1",ss);            //新男生 相册 获取
Huoqu(".NanshenSP",address1+"/admin/BoyReview/getNewVideo","#myModal102",".nav-content2","list1","NXtouXiang2",ss);            //新男生 视频 获取
Huoqu(".NanshnYY",address1+"/admin/BoyReview/getNewVoice","#myModal103",".nav-content2","list1","NXtouXiang3",ss);            //新男生 语音 获取
Huoqu(".NanshenSF",address1+"/admin/BoyReview/getNewIdCard","#myModal104",".nav-content2","list1","NXtouXiang4",ss);            //新男生 身份证 获取
Huoqu(".NansheZY",address1+"/admin/BoyReview/getNewVehicleAuth","#myModal105",".nav-content2","list1","NXtouXiang5",ss);            //新男生 职业 获取
//点击头像后的AJAX
function ajaxF(TXOBJ,URL,sex){
    $(".Shencha1").ajaxComplete(function(){  //ajaxComplete()  在执行AJAX 之后执行的函数
        $(TXOBJ).unbind("click").bind("click",function(){
            var Qid=$(this).children("span").text();  //获取 本张图片用户ID
            var setData={};
            $(this).addClass("remove-child").siblings().removeClass("remove-child");//作为删除的标记
            //判断是男生还是女生
            if(sex=="boy"){setData={boy_id:Qid}}else{setData={girl_id:Qid}};
            $.ajax({
                type:"POST",
                url:URL,
                dataType:"json",
                data:setData,
                success:function(data){
                    console.log(data);
                    chushihua();
                    $div1="";$div2="";

                    //$.each(TT,function(i){})   //需循环添加
                    $div1="<div style='width: 100%'><img style='width: 30%' class='wei_car pimg' src='' alt='无'/>" +
                        "<div class='text-center Dis'></div>" +
                        "</div>"; //头像的DIV
                    $div2="<div style='height: 170px''><img class='pimg' src='' alt='无'/>" +
                        "<div class='text-center Dis'></div>" +
                        "</div>"; //人脸的DIV
                    $ship="<div style='width: 100%'><video controls width='240px' src='http://www.runoob.com/try/demo_source/movie.mp4'></video><div class='text-center Dis'></div></div>";
                    $div4="<div class='anniudiv'>" +
                        "<button class='btn btn-danger TXbutongguo1'><span class='icon-remove'></span></button>" +    //评价按钮
                        "<button class='btn btn-success TXbutongguo2'><span class='icon-ok'></span></button>" +
                        "</div>"

                    $div5="<div style='float: left;width: 100%;display: block' class='zhuangt'>" +
                        "<br/>" +
                        "<form class='project project1' class='modal-form'>" +
                        "<label class='unselect'  for='chenei1'>拉黑<input  value='4' type='radio' id='chenei1' name='project'></label>" +
                        "<label class='unselect'  for='chenei2'>普通<input value='1' type='radio' id='chenei2' name='project'></label>" +
                        "<label class='unselect'  for='jujia1'>置顶<input  value='2' type='radio' id='jujia1' name='project'></label>" +
                        "<label class='unselect'  for='gonggong1'>屏蔽<input value='3' type='radio' id='gonggong1' name='project'></label>" +
                        "</form>"+
                        "</div>";

                    $div6="<button class='btn btn-large btn-primary TJ' style='margin-top: 20px'>提交审核</button>";

                    $YYtishi="<div class='text-center Dis'></div>";$modal_tishi="<div><div class='text-center Dis'></div></div>";
                    $div8="<div> <div id='player3' class='aplayer' style='margin-top: 20px;'></div>";                           //语音
                    //$div88="<div><audio></audio></div>"
                    $dvi9="<div class='clearfix N-shengfen-div'><div class='clearfix in_div'><div class='text-center zhengming'><img src=''/></div><div class='text-center fanmian'><img src=''/></div></div><div class='text-center Dis'></div></div>";//  身份验证 and 职业认证

                    $Nicheng="<div style='width: 100%;'><span class='xinyonghuNC'></span>" +   //昵称
                        "<div class='text-center Dis Dis1' style='display: block; position: relative;bottom: 0;color: black'></div>" +
                        "</div>";

                    $yuantou="<div class='NX-toux-zt' style='width: 100%;height: 170px'><img class='yuantouxian pimg' src='' alt='无'/>" +
                        "<div class='text-center Dis'></div>" +    //女新用户头像
                        "</div>";
                    $yuanship="<div style='width: 100%;height: 170px'><img class='yuanship pimg' style='width: 35%' src=''/>" +
                        "<div class='text-center Dis'></div>" +
                        "</div>";
                    //新女用户 新上传头像的
                    $NxiTX="<div style='width: 100%;height: 170px'><img class='Nxintoux pimg' style='width: 35%' /> <div class='text-center Dis'></div> </div>";
                    //新女用户 新上传视频的
                    $NxinSP="<div style='width: 100%;height: 170px'><img style='width: 35%' src='' class='Nxinship pimg'/>" +
                        "<div class='text-center Dis'></div>" +
                        "</div>";

                    //女 职业   模特的
                    var Madol2="<div class='mote' style='position: absolute;bottom: 0px;width: 100%;margin: 0 auto;'><div></div><div class='text-center Dis' style='width: 100%;left: 0%'></div></div>";
                    // 女  平台认证内容
                    var wanghong="<div id='platform_auth_id'>" +
                        "<span>平台名字：</span><strong class='platform_id' style='padding-right: 50px'></strong>" +
                        "<span>平台：</span><strong class='platform_name'></strong><br/>" +
                        "<span class='Zytype'></span>" +
                        "</div>";
                    var chishi="<div class='text-center car_icon_modao'>" +
                        "<img class='pimg' style='width: 170px;height: 170px' /> " +
                        "<span class='car-ccion'  style='font-size: 36px;font-weight: 700'></span> " +
                        "<span class='car-mmdoal' style='margin-left: 20px;font-size: 36px;font-weight: 700'></span>" +
                        "</div>";


                    // 往模态框添加元素
                    Nvshenhe();                                           //女生模态框添加
                    Nanshenhe();                                          //男生模态框添加

                    // 审核头像---人脸识别按钮
                    ifShow();

                    // 女佣户审核
                    //NVXINYONH();// 新女佣户审核-----------------提交
                    //女未通过审核
                    Nv_weitonguo()//女未通过审核--------------提交
                    //女头像审核
                    Nv_touxian()//女头像审核----------------提交
                    //女照片审核
                    Nv_zhaopian()//女照片审核--------------提交
                    //女视频审核
                    Nv_shipin()//女视频审核---------提交
                    //女语音审核
                    Nv_yuyin()//女语音审核--------------提交
                    //女身份证审核
                    Nv_shenfz()//女身份证审核-------------提交
                    //女职业审核
                    Nv_zhiye()//女模特审核-------------------提交
                    Nv_wanghong()//女网红-------------提交
                    Nv_bailing()//女白领------------提交


                    //男用户审核
                    NANTOUXIANG();//男头像审核---------------提交
                    //男相册审核
                    Nan_xiangce();//男相册审核--------------提交
                    //男视频审核
                    Nan_shipin()//男视频审核------------提交
                    //男语音审核
                    Nan_yuyin()//男语音---------------提交
                    //男身份证审核
                    Nan_shenfenzheng() //男身份证审核------------提交
                    //男职业审核
                    Nan_zhiye()//男职业审核------------提交


                    function Nvshenhe(){
                        //女---非会员审核
                        if(TXOBJ==".XtouXiang6"){

                            var vv=data.data;
                            if(vv.head_img_state==3){vv.head_img_state="未通过"}; if(vv.head_img_state==2){vv.head_img_state="通过"}; if(vv.head_img_state==1){vv.head_img_state="未审核"};
                            if(vv.face_img_state==3){vv.face_img_state="未通过"}; if(vv.face_img_state==2){vv.face_img_state="通过"};if(vv.face_img_state==1){vv.face_img_state="未审核"};
                            if(vv.girl_nick_state==3){vv.girl_nick_state="未通过"}; if(vv.girl_nick_state==2){vv.girl_nick_state="通过"};if(vv.girl_nick_state==1){vv.girl_nick_state="未审核"};
                            $(".fangTS7").append("<h5>头像</h5>").append($yuantou); $(".fanTuP7").append("<h5>人脸</h5>").append($yuanship);$(".fanTJ7").append($div6);
                            $(".project1 label").css({"margin-top":"30px"});
                            $(".fanTJ7 .TJ").addClass("Nv_weitonguo");

                            //判断头像
                            if(vv.head_img_state=="未审核"){
                                $(".fangTS7m").append("<h5>头像</h5>").append($NxiTX,$div4);
                                $(".fangTS7m").addClass("addDisplay").removeClass("car-hide");
                            }else{
                                $(".fangTS7m").append($NxiTX); $(".fangTS7m").addClass("car-hide").removeClass("addDisplay");
                                $(".fangTS7m .Nxintoux").next().html("<span value=0>"+vv.head_img_state+"</span>").css({"display":"block","background":"white"});
                            };
                            //判断人脸
                            if(vv.face_img_state=="未审核"){
                                $(".fanTuP7m").append("<h5>人脸</h5>").append($NxinSP,$div4);
                                $(".fanTuP7m").addClass("addDisplay").removeClass("car-hide");
                            }else{
                                $(".fanTuP7m").append($NxinSP);$(".fanTuP7m").addClass("car-hide").removeClass("addDisplay");
                                $(".fanTuP7m .Dis").html("<span value=0>"+vv.face_img_state+"</span>").css({"display":"block","background":"white"});
                            }
                            //判断昵称
                            if(vv.girl_nick_state=="未审核"){
                                $(".fanNC").append($Nicheng,$div4);
                            }else{
                                $(".fanNC").append($Nicheng);
                                $(".fanNC .Dis").html("<span value=0>"+vv.girl_nick_state+"</span>")
                            }
                            //判断状态
                            if(vv.show_status==0||vv.show_status==""||vv.show_status==undefined){
                                $(".fanPJ70").append($div5);           $(".fanPJ70").addClass("car-hide").removeClass("addDisplay");
                            }else{
                                $(".fanPJ70").append($div5).append("<span value='"+data.data.show_status+"'></span>");
                                $(".fanPJ70").addClass("car-hide").removeClass("addDisplay");
                            }


                            if(vv.girl_nick==""||vv.girl_nick==undefined){
                                $(".fanNC").css("dispaly","none");
                            }
                            $(".xinyonghuNC").text(""+vv.girl_nick+"");
                            if(vv.auth_head_img==undefined||vv.auth_head_img==""){
                                $(".fangTS7").html("<h1>无图片</h1>")
                            }
                            if(vv.auth_face_img==undefined||vv.auth_face_img==""){
                                $(".fanTuP7").html("<h1>无图片</h1>")
                            }
                            $(".yuantouxian").attr("src",""+vv.auth_head_img+"");
                            $(".yuanship").attr("src",""+vv.auth_face_img+"");
                            //判断是否有头像-------有人脸识别---new
                            if(vv.head_img==undefined&&vv.face_img){
                                $(".Nxinship").attr("src",""+vv.face_img+"");
                                $(".fangTS7m").empty();
                            }
                            //判断是否有人脸识别-------有头像--new
                            if(vv.face_img==undefined&&vv.head_img){
                                $(".Nxintoux").attr("src",""+vv.head_img+"");
                                $(".fanTuP7m").empty();
                            }
                            //两者都有
                            if(vv.head_img&&vv.face_img){
                                $(".Nxintoux").attr("src",""+vv.head_img+"");                  $(".Nxinship").attr("src",""+vv.face_img+"");

                            }
                            $(".pimg").click(function(){
                                var _this = $(this);//将当前的pimg元素作为_this传入函数
                                imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
                            });
                            show_stata($(".fanPJ70 input"), $(".fanPJ70 label"));
                        }

                        if(TXOBJ==".XtouXiang0"){//头像的
                            var  Uphead=data.data;
                            $(".fangTS1").append("<h5>头像</h5>").append($yuantou); $(".fanTuP1").append("<h5>人脸</h5>").append($yuanship);$(".fanTup21 .Nv_newTX").append($div1,$div4);$(".fanTJ1").append($div6);
                            $(".TJ").addClass("Nv_xiangce-TJ");$(".fanPJ1").append($div5).append("<span value='"+data.data.show_status+"'></span>");
                            $(".fangTS1 img").attr("src",Uphead.auth_head_img); $(".fanTuP1 img").attr("src",Uphead.auth_face_img);
                            $(".Nv_newTX img").attr("src",Uphead.head_img);
                            $(".pimg").click(function(){
                                var _this = $(this);//将当前的pimg元素作为_this传入函数
                                imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
                            });
                            show_stata($(".fanPJ1 input"), $(".fanPJ1 label"));
                        }
//照片的
                        if(TXOBJ==".XtouXiang1"){
                            $photo1=""; $photo2="";
                            //公开照片
                            var Uptuplength=data.data.public_photo;
                            var Uptuplength1=data.data.private_photo;
                            console.log(Uptuplength1);
                            $.each(Uptuplength,function(i){
                                $photo1+="<div class='zhaopdiv'><div class='zhaopdiv1'><img class='pimg'  src='"+Uptuplength[i].public_photo+"'/><span class='img_id' style='display: none;'>"+Uptuplength[i].public_photo_id+"</span>" +
                                    "<div class='text-center Dis Nv_zhaopian1' style='display: block; position: relative;bottom: 0;color: black'></div>" +
                                    "</div></div>"
                            });
                            //私密照片
                            $.each(Uptuplength1,function(i){
                                $photo2+="<div class='zhaopdiv'><div class='zhaopdiv2'>" +
                                    "<div style='position: absolute;left: 50%;margin-left: -15%;top: -20px;'>私密照片</div>" +
                                    "<img class='pimg' src='"+Uptuplength1[i].private_photo+"'/><span class='img_id' style='display: none'>"+Uptuplength1[i].private_photo_id+"</span>" +
                                    "<div class='text-center Dis Nv_zhaopian2' style='display: block; position: relative;bottom: 0;color: black'></div>" +
                                    "</div></div>"
                            });
                            $(".fangTS2").append("<h5>头像</h5>").append($yuantou); $(".fanTuP2").append("<h5>人脸</h5>").append($yuanship);$(".fanTup22").append($photo1,$photo2);$(".zhaopdiv").append($div4);$(".fanTJ2").append($div6);
                            $(".TJ").addClass("Nv_zhaopian_TJ"); $(".fanTup22 .Dis").addClass("Nv_zhaopian");$(".fanPJ2").append($div5).append("<span value='"+data.data.show_status+"'></span>");
                            $(".fangTS2 .yuantouxian").attr("src",data.data.head_img);$(".fanTuP2 .yuanship").attr("src",data.data.face_img);

                            $(".pimg").click(function(){
                                var _this = $(this);//将当前的pimg元素作为_this传入函数
                                imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
                            });
                            show_stata($(".fanPJ2 input"), $(".fanPJ2 label"));
                        }

                        if(TXOBJ==".XtouXiang2"){//视频的
                            var  Upship=data.data;
                            $(".fangTS3").append("<h5>头像</h5>").append($div1); $(".fanTuP3").append("<h5>人脸</h5>").append($div2);$(".fanSP3").append( $ship,$div4);$(".fanTJ3").append($div6);
                            $(".fanTJ2").css({"margin-top":"50px"}); $(".TJ").addClass("Nv_ship_TJ"); $(".fanPJ3").append($div5).append("<span value='"+data.data.show_status+"'></span>");
                            $(".fanSP3 .Dis").addClass("Nv_ship_div");$(".fanSP3 video").attr("src",Upship.girl_video);
                            $(".fangTS3 img").attr("src",Upship.head_img);$(".fanTuP3 img").attr("src",Upship.face_img);
                            show_stata($(".fanPJ3 input"), $(".fanPJ3 label"));
                        }

                        if(TXOBJ==".XtouXiang3"){//语音的
                            $(".fangTS4").append("<h5>头像</h5>").append($div1); $(".fanTuP4").append("<h5>人脸</h5>").append($div2);$(".fanYY").append($div8,$div4);$(".fanTJ4").append($div6);
                            $(".fanTJ4").css({"margin-top":"50px"});$(".TJ").addClass("Nv_yuyin_TJ");$(".fanPJ4").append($div5).append("<span value='"+data.data.show_status+"'></span>");
                            $(".fanYY div:first-child").append($YYtishi); $(".Dis").addClass("NV_yuyin");
                            $(".fangTS4 img").attr("src",data.data.head_img);$(".fanTuP4 img").attr("src",data.data.face_img);
                            //var ap3 = new APlayer({
                            //    element: document.getElementById('player3'),
                            //    narrow: false,
                            //    autoplay: false,
                            //    showlrc: false,
                            //    theme: '#ad7a86',
                            //    mutex: true,
                            //    music: {
                            //        title: "贵觅",
                            //        author: "语音认证",
                            //        url: data.data.girl_voice,
                            //        pic:"img/head/2014.jpg"
                            //    }
                            //});
                            //ap3.init();
                            //$("#myModal35").unbind("hide.bs.modal").on('hide.bs.modal', function () {
                            //    ap3.pause();
                            //})
                            aplayer("ap3","贵觅","语音认证",data.data.girl_voice,"img/head/2014.jpg", 'player3',"#myModal35");
                            show_stata($(".fanPJ4 input"), $(".fanPJ4 label"));

                        }
                        if(TXOBJ==".XtouXiang4"){//身份证的

                            $(".fangTS5").append("<h5>头像</h5>").append($div1); $(".fanTuP5").append("<h5>人脸</h5>").append($div2);$(".fanSFZ").append($div1,$div4);$(".fanTJ5").append($div6);
                            $(".fanTJ5").css({"margin-top":"50px"}); $(".fanPJ5").append($div5).append("<span value='"+data.data.show_status+"'></span>");
                            $(".TJ").addClass("Nv_shengfenzheng_TJ");$(".Dis").addClass("Nv_shenfen");
                            $(".fangTS5 img").attr("src",data.data.head_img); $(".fanTuP5 img").attr("src",data.data.face_img);
                            $(".fanSFZ img").attr("src",data.data.girl_idcard);
                            $(".pimg").click(function(){
                                var _this = $(this);//将当前的pimg元素作为_this传入函数
                                imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
                            });
                            show_stata($(".fanPJ5 input"), $(".fanPJ5 label"));
                        }
                        if(TXOBJ==".XtouXiang5"){//职业的-------模特
                            var Upmadol=data.data;
                            $(".fangTS6").append("<h5>头像</h5>").append($div1); $(".fanTuP6").append("<h5>人脸</h5>").append($div2);$(".fanTJ6").append($div6);
                            $(".fanTJ6").css({"margin-top":"50px"});$(".fanPJ6").append($div5).append("<span value='"+data.data.show_status+"'></span>");
                            $(".TJ").addClass("Nv_zhiye_TJ");$(".Dis").addClass("Nv_zhiye");$(".moadal-img").append("<img class='pimg' /><img  class='pimg' /><img  class='pimg' />").append($modal_tishi,$div4);
                            $(".fanZY .moadal-img>img").eq(0).attr("src",Upmadol.model_img_one);$(".fanZY .moadal-img>img").eq(1).attr("src",Upmadol.model_img_two);
                            $(".fanZY .moadal-img>img").eq(2).attr("src",Upmadol.model_img_three);$(".fangTS6 img").attr("src",Upmadol.head_img);
                            $(".fanTuP6 img").attr("src",Upmadol.face_img);

                            $(".pimg").click(function(){
                                var _this = $(this);//将当前的pimg元素作为_this传入函数
                                imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
                            });
                            show_stata($(".fanPJ6 input"), $(".fanPJ6 label"));
                        }
                        if(TXOBJ==".XtouXiang7"){//职业的-------网红
                            var Uppintai=data.data.webCelebrity;
                            if(Uppintai==""){Uppintai=data.data.networkAnchor};
                            if(Uppintai.type==7){Uppintai.type="网红"};if(Uppintai.type==8){Uppintai.type="主播"};
                            $(".fangTS-7").append("<h5>头像</h5>").append($div1);$(".fanTuP-7").append("<h5>人脸</h5>").append($div2);$(".fanTJ-7").append($div6);
                            $(".wezi").append(wanghong,Madol2,$div4); $(".fanTJ-7").addClass("Nv_wanghong");
                            $(".wezi").css({"width":"80%","margin":"30px auto"});$(".fanPJ7").append($div5).append("<span value='"+data.data.show_status+"'></span>");
                            $(".fangTS-7 img").attr("src",data.data.head_img);$(".fanTuP-7 img").attr("src",data.data.face_img);
                            $(".wezi .platform_id").text(Uppintai.platform_id);$(".wezi .platform_name").text(Uppintai.platform_name);
                            $(".wezi .Zytype").text(Uppintai.type).attr("value",Uppintai.type);
                            if($(".wezi .Zytype").attr("value")=="主播"){$(".wezi .Zytype").attr("value","8")};
                            if($(".wezi .Zytype").attr("value")=="网红"){$(".wezi .Zytype").attr("value","7")};
                            show_stata($(".fanPJ7 input"), $(".fanPJ7 label"));
                            $("#platform_auth_id").attr("value",Uppintai.platform_auth_id)
                        }
                        if(TXOBJ==".XtouXiang8"){//职业的-----白领
                            //女 职业 白领的
                            if(data.data.type==1){data.data.type="白领"};if(data.data.type==2){data.data.type="医护"};if(data.data.type==3){data.data.type="空乘"};
                            if(data.data.type==4){data.data.type="学生"};if(data.data.type==5){data.data.type="教师"};if(data.data.type==6){data.data.type="舞蹈"};
                            var bailin="<div style='position: relative;width: 20%;margin: 0 auto;'><div><img src='"+data.data.profession+"' alt=''/></div>" +
                                "<div class='text-center Dis'></div>" +
                                "<h4 class='bailName' style='position: absolute;bottom: -35px;left: 40%'></h4>" +
                                "</div>";
                            $(".fangTS-8").append("<h5>头像</h5>").append($div1);$(".fanTuP-8").append("<h5>人脸</h5>").append($div2);$(".wezi-1").append(bailin,$div4);$(".fanTJ-8").append($div6);
                            $(".wezi-1 img").css({"width":"200px","height":"200px"}); $(".wezi-1 .anniudiv").css({"bottom":null});$(".fanTJ-8").addClass("Nv_bailing");
                            $(".wezi-1 .Dis").css({"width":"100%","left":"0"});$(".fanPJ8").append($div5).append("<span value='"+data.data.show_status+"'></span>");
                            $(".fangTS-8 img").attr("src",data.data.head_img);$(".fanTuP-8 img").attr("src",data.data.face_img);
                            $(".bailName").text(data.data.type).attr("value",data.data.type); var typeValue=$(".bailName");
                            if(typeValue.attr("value")=="白领"){typeValue.attr("value",1)};if(typeValue.attr("value")=="医护"){typeValue.attr("value",2)};if(typeValue.attr("value")=="空乘"){typeValue.attr("value",3)};
                            if(typeValue.attr("value")=="学生"){typeValue.attr("value",4)};if(typeValue.attr("value")=="教师"){typeValue.attr("value",5)};if(typeValue.attr("value")=="舞蹈"){typeValue.attr("value",6)};
                            $(".wezi-1 img").addClass("pimg");
                            $(".pimg").click(function(){
                                var _this = $(this);//将当前的pimg元素作为_this传入函数
                                imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
                            });
                            show_stata($(".fanPJ8 input"), $(".fanPJ8 label"));
                        }

                    };
                    function Nanshenhe(){
                        var boyData=data.data;
                        if(TXOBJ==".NXtouXiang"){
                            // 新用户的

                            console.log(boyData);
                            $(".NfangTS-ord").append("<h5>原头像</h5>").append($div1); $(".NfangTS-new").append("<h5>新头像</h5>").append($div1,$div4); $(".NfanPJ").append($div5).append("<span value='"+boyData.show_status+"'></span>");
                            $(".NfanTJ").append($div6);$(".TJ").addClass("TJ-Ntouxian");
                            $(".NfangTS-ord img").attr("src",boyData.auth_head_img); $(".NfangTS-new img").attr("src",boyData.head_img);
                            $(".NfangTS-new img").addClass("pimg");
                            //判断昵称是否审核
                            if(boyData.boy_nick_state==1){
                                $(".Nfannic").append($Nicheng,$div4);
                            }if(boyData.boy_nick_state==2){$(".Nfannic").append($Nicheng)}
                            $(".xinyonghuNC").text(""+boyData.boy_nick+"");
                            $(".pimg").click(function(){
                                var _this = $(this);//将当前的pimg元素作为_this传入函数
                                imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
                            });
                            show_stata($(".NfanPJ input"), $(".NfanPJ label"));
                        };
                        if(TXOBJ==".NXtouXiang1"){
                            // 新相册的
                            $photo1=""; $photo2="";
                            //公开照片
                            var Uptuplength=data.data.public_photo;
                            var Uptuplength1=data.data.private_photo;
                            $.each(Uptuplength,function(i){
                                $photo1+="<div class='zhaopdiv'><div class='zhaopdiv1'><img class='pimg'  src='"+Uptuplength[i].public_photo+"'/><span class='img_id' style='display: none;'>"+Uptuplength[i].public_photo_id+"</span>" +
                                    "<div class='text-center Dis Nan_zhaopian1' style='display: block; position: relative;bottom: 0;color: black'></div>" +
                                    "</div></div>"
                            });
                            //私密照片
                            $.each(Uptuplength1,function(i){
                                $photo2+="<div class='zhaopdiv'><div class='zhaopdiv2'>" +
                                    "<div style='position: absolute;left: 50%;margin-left: -15%;top: -20px;'>私密照片</div>" +
                                    "<img class='pimg'  src='"+Uptuplength1[i].private_photo+"'/><span class='img_id' style='display: none'>"+Uptuplength1[i].private_photo_id+"</span>" +
                                    "<div class='text-center Dis Nan_zhaopian2' style='display: block; position: relative;bottom: 0;color: black'></div>" +
                                    "</div></div>"
                            });
                            $(".NfangTS2").append("<h5>头像</h5>").append($div1); $(".NfanTX2").append($photo1,$photo2);$(".zhaopdiv").append($div4);$(".NfanTJ2").append($div6);
                            $(".NfanTX2 .Dis").addClass("Nan_zhaopian");
                            $(".NfanTJ2").css({"margin-top":"50px"});$(".NfanPJ2").append($div5).append("<span value='"+boyData.show_status+"'></span>");
                            $(".TJ").addClass("Nan_xiangce_TJ");$(".NfangTS2 img").attr("src",data.data.head_img);
                            $(".pimg").click(function(){
                                var _this = $(this);//将当前的pimg元素作为_this传入函数
                                imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
                            });
                            show_stata($(".NfanPJ2 input"), $(".NfanPJ2 label"));
                        };
                        if(TXOBJ==".NXtouXiang2"){
                            // 新视频的
                            $(".NfangTS3").append($div1);$(".NfanSP").append($ship,$div4);$(".NfanTJ3").append($div6);
                            $(".NfanTJ3").css({"margin-top":"50px"});$(".NfanPJ3").append($div5).append("<span value='"+boyData.show_status+"'></span>");
                            $(".NfangTS3").css({"width":"50%","margin":"0 auto"});
                            $(".TJ").addClass("Nan_shipin_TJ"); $(".Dis").addClass("N_ship");
                            $(".NfangTS3 img").attr("src",boyData.head_img);$(".NfanSP video").attr("src",boyData.boy_video);
                            show_stata($(".NfanPJ3 input"), $(".NfanPJ3 label"));
                        } if(TXOBJ==".NXtouXiang3"){
                            // 新语音的
                            $(".NfangTS4").append($div1);$(".NfanYY").append($div8,$div4);$(".NfanTJ4").append($div6);
                            $(".NfanTJ4").css({"margin-top":"50px"});  $(".NfanYY div:first-child").append($YYtishi);
                            $(".NfanPJ4").append($div5).append("<span value='"+boyData.show_status+"'></span>");
                            $(".NfangTS4").css({"width":"50%","margin":"0 auto"});
                            $(".TJ").addClass("Nan_yuyin");$(".Dis").addClass("N_yuyin");
                            $(".NfangTS4 img").attr("src",boyData.head_img);
                            aplayer("ap1","贵觅","语音认证",boyData.boy_voice,"img/head/2014.jpg", 'player3',"#myModal103");
                            show_stata($(".NfanPJ4 input"), $(".NfanPJ4 label"));


                        } if(TXOBJ==".NXtouXiang4"){
                            // 新身份证的
                            $(".NfangTS5").append($div1); $(".NfanTX5").append($div1,$div4);$(".NfanTJ5").append($div6);
                            $(".NfanPJ5").append($div5).append("<span value='"+boyData.show_status+"'></span>");
                            $(".NfanTJ5").css({"margin-top":"50px"});
                            $(".NfangTS5").css({"width":"50%","margin":"0 auto"});
                            $(".TJ").addClass("Nan_shengfenzheng");$(".Dis").addClass("Nan_shenfen_tj");
                            $(".NfanTX5 img").attr("src",boyData.boy_idcard);$(".NfangTS5 img").attr("src",boyData.head_img);
                            $(".NfanTX5 img").addClass("pimg");
                            $(".pimg").click(function(){
                                var _this = $(this);//将当前的pimg元素作为_this传入函数
                                imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
                            });
                            show_stata($(".NfanPJ5 input"), $(".NfanPJ5 label"));
                        }if(TXOBJ==".NXtouXiang5"){
                            // 车辆认证
                            $(".NfangTS6").append($div1); $(".NfanTX6").append(chishi,$div1,$div4);$(".NfanTJ6").append($div6);
                            $(".NfanTJ6").css({"margin-top":"50px"});
                            $(".NfanPJ6").append($div5).append("<span value='"+boyData.show_status+"'></span>");
                            $(".NfangTS6").css({"width":"50%","margin":"0 auto"});
                            $(".TJ").addClass("Nan_zhiye-TJ");$(".Dis").addClass("Nan_zhiye");
                            $(".NfangTS6 img").attr("src",boyData.head_img);$(".NfanTX6 .wei_car").attr("src",boyData.license);
                            $(".NfanTX6 .car_icon_modao img").attr("src",boyData.vehicle_brand_img);
                            $(".NfanTX6 .car_icon_modao .car-ccion").text(boyData.vehicle_brand);
                            $(".NfanTX6 .car_icon_modao .car-mmdoal").text(boyData.vehicle_model);
                            show_stata($(".NfanPJ6 input"), $(".NfanPJ6 label"));
                        }
                    }
                    //多选框样式 js
                    $(".project label").click(function(){
                        var va=$(this).children().val();
                        $(this).parent().attr("value",va);
                        $(this).attr("class","select").siblings().attr("class","unselect");
                    });
                    //  用来显示用户已给的状态
                    function show_stata(obj1,obj2){
                        var show_statu = data.data.show_status;
                        if (show_statu == "" || show_statu == undefined){
                            return
                        }else{
                            for(var kk = 0 ; kk < obj1.length; kk++){
                                if (obj1.eq(kk).attr("value") == show_statu) {
                                    obj2.eq(kk).addClass("select").removeClass("unselect");
                                }
                            }
                        }
                    }

                },
                error:function(){
                    swal("请求失败");
                }
            });
            //女未通过审核--------------提交
            function Nv_weitonguo(){
                $(".Nv_weitonguo").unbind("click").on("click",function () {
                    var stt={};
                    var tt=$(".fanNC .Dis").children("span").text();
                    stt.girl_head_state=$(".fangTS7m .Dis").children("span").attr("value");
                    stt.girl_face_state=$(".fanTuP7m .Dis").children("span").attr("value");
                    stt.girl_nick_state=$(".fanNC .Dis").children("span").attr("value");
                    stt.show_status=$(".fanPJ70 form").attr("value");
                    stt.girl_id=Qid;
                    //判断是否选状态
                    if(stt.show_status==undefined || stt.show_status == $(".fanPJ70 span").attr("value")){
                        stt.show_status=0;
                    }
                    var isTf=Istrue();
                    if(stt.girl_head_state==undefined||stt.girl_face_state==undefined||tt==undefined||tt==""||isTf)
                    {
                        swal({
                            title:"你有操作未完成！！",
                            text:"请完成操作后再提交。",
                            type:"info",
                            showCancelButton: false,
                            allowEscapeKey:true,
                            allowOutsideClick:true,
                            closeOnConfirm: false,
                            confirmButtonColor: "#DD6fff"
                        });
                        return
                    };
                    swal({
                    				title: "你确定要提交审核信息吗?",
                    				text: "请核准审核资料！！！",
                    				type: "info",
                    				showCancelButton: true,
                    				confirmButtonColor: "#DD6B55",
                    				confirmButtonText: "确定",
                    				cancelButtonText: "取消",
                    				closeOnConfirm: false,
                    				closeOnCancel: false
                    			},
                    			function(isConfirm) {
                    				if(isConfirm) { //点击确定的时候
                    				  comiteCace_other(stt, address1 + "/admin/GirlReview/setNewGirlAuth", "#myModal38");
                    				} else { //点击取消按钮
                    					swal.close();
                    					return
                    				}
                    			})
//                  TJ_ajax(address1+"/admin/GirlReview/setNewGirlAuth","#myModal38",stt);
                  
                })
            };

            //女头像审核----------------提交
            function Nv_touxian(){
                $(".Nv_xiangce-TJ").unbind("click").on("click",function () {
                    var sto={};
                    sto.girl_head_state=$(".Nv_newTX span").attr("value");
                    sto.show_status=$(".fanPJ1 form").attr("value");
                    if(sto.girl_head_state==undefined){     swal({
                        title:"你有操作未完成！！",
                        text:"请完成操作后再提交。",
                        type:"info",
                        showCancelButton: false,
                        allowEscapeKey:true,
                        allowOutsideClick:true,
                        closeOnConfirm: false,
                        confirmButtonColor: "#DD6fff"
                    });return};
                    sto.girl_id=Qid;
                    if(sto.show_status==undefined||sto.show_status==$(".fanPJ1 span").attr("value")){sto.show_status=0};
                    console.log(sto)
//                  TJ_ajax(address1+"/admin/GirlReview/setMemberHead","#myModal32",sto);
                    comiteCace_other(sto, address1 + "/admin/GirlReview/setMemberHead", "#myModal32");
                })
            };

            //女照片审核--------------提交
            function Nv_zhaopian(){
                $(".Nv_zhaopian_TJ").unbind("click").on("click",function () {
                    var ss={},tt=new Array(),yy=new  Array(),oo=[], len1=$(".fanTup22 .zhaopdiv1 .Dis").length, len2=$(".fanTup22 .zhaopdiv2 .Dis").length;
                    var uu=new Array(),len=$(".fanTup22  .Dis").length;
                    ss.girl_id=Qid; ss.show_status=$(".fanPJ2 form").attr("value");
                    for(var i=0;i<len1;i++){
                        tt[i]={photo_id:$(".fanTup22 .zhaopdiv1 .img_id").eq(i).text(),is_check:$(".Nv_zhaopian1").eq(i).find("span").attr("value")};
                    };

                    for(var j=0;j<len2;j++){
                        yy[j]={photo_id:$(".fanTup22 .zhaopdiv2 .img_id").eq(j).text(),is_check:$(".Nv_zhaopian2").eq(j).find("span").attr("value")};
                    };
                    //判断哪张没审核
                    for(var a=0;a<len;a++){
                        uu[a]={photo_id:$(".fanTup22 .img_id").eq(a).text(),is_check:$(".Nv_zhaopian").eq(a).find("span").attr("value")};
                    };

                    for(var c=0;c<uu.length;c++){
                        if(uu[c].is_check==undefined){oo.push(c+1)}
                    };
                    if(oo.length>=1){
                        swal({
                            title:"你有操作未完成！！",
                            text:"第"+oo+"张没有审核！！",
                            type:"info",
                            showCancelButton: false,
                            allowEscapeKey:true,
                            allowOutsideClick:true,
                            closeOnConfirm: false,
                            confirmButtonColor: "#DD6fff"
                        });return};
                    ss.public_photo=tt;ss.private_photo=yy;
                    //判断没有操作或者操作的状态和之前一样的时候    show_status=0
                    if(ss.show_status==undefined||ss.show_status==$(".fanPJ2 span").attr("value")){ss.show_status=0};
//                  TJ_ajax1(address1+"/admin/GirlReview/setPhoneAuth","#myModal33",ss);
                       comiteCace(ss,address1+"/admin/GirlReview/setPhoneAuth","#myModal33");
                })
            };

            //女视频审核---------提交
            function Nv_shipin(){
                $(".Nv_ship_TJ").unbind("click").on("click",function () {
                    var vv={};
                    vv.video_status=$(".Nv_ship_div").find("span").attr("value");
                    vv.show_status	=$(".fanPJ3 form").attr("value");
                    if(vv.show_status==undefined||vv.show_status==$(".fanPJ3 span").attr("value")){vv.show_status=0};
                    if(vv.video_status==undefined){  swal({
                        title:"你有操作未完成！！",
                        text:"请完成操作后再提交。",
                        type:"info",
                        showCancelButton: false,
                        allowEscapeKey:true,
                        allowOutsideClick:true,
                        closeOnConfirm: false,
                        confirmButtonColor: "#DD6fff"
                    });return};
                    vv.girl_id=Qid;
//                  TJ_ajax(address1+"/admin/GirlReview/setVideoAuth","#myModal34",vv);
                    comiteCace_other(vv, address1 + "/admin/GirlReview/setVideoAuth", "#myModal34");
                });
            };

            //女语音审核--------------提交
            function Nv_yuyin(){
                $(".Nv_yuyin_TJ").unbind("click").on("click",function () {
                    var vv1={};
                    vv1.show_status=$(".fanPJ4 form").attr("value");
                    if(vv1.show_status==undefined||vv1.show_status==$(".fanPJ4 span").attr("value")){vv1.show_status=0};
                    vv1.voice_status=$(".NV_yuyin").find("span").attr("value");
                    if(vv1.voice_status==undefined){swal({title:"你有操作未完成！！", text:"请完成操作后再提交。", type:"info", showCancelButton: false, allowEscapeKey:true, allowOutsideClick:true, closeOnConfirm: false, confirmButtonColor: "#DD6fff"
                    });return};
                    vv1.girl_id=Qid;
//                  TJ_ajax(address1+"/admin/GirlReview/setVoiceAuth","#myModal35",vv1);
                     comiteCace_other(vv1, address1 + "/admin/GirlReview/setVoiceAuth", "#myModal35");
                });
            };
            //女身份证审核----------提交
            function Nv_shenfz(){
                $(".Nv_shengfenzheng_TJ").unbind("click").on("click",function () {
                    var sf={};
                    sf.show_status=$(".fanPJ5 form").attr("value");
                    if(sf.show_status==undefined||sf.show_status==$(".fanPJ5 span").attr("value")){sf.show_status=0};
                    sf.idcard_status=$(".fanSFZ .Dis").find("span").attr("value");
                    if(sf.idcard_status==undefined){swal({title:"你有操作未完成！！", text:"请完成操作后再提交。", type:"info", showCancelButton: false, allowEscapeKey:true, allowOutsideClick:true, closeOnConfirm: false, confirmButtonColor: "#DD6fff"
                    });return};
                    sf.girl_id=Qid;
//                  TJ_ajax(address1+"/admin/GirlReview/setGirlIdCard","#myModal36",sf);
                     comiteCace_other(sf, address1 + "/admin/GirlReview/setGirlIdCard", "#myModal36");
                })
            };
            //女网红审核---------------提交
            function Nv_wanghong(){
                $(".Nv_wanghong").unbind("click").on("click",function () {
                    var wh={};
                    wh.platform_auth_id=$("#platform_auth_id").attr("value");
                    wh.show_status=$(".fanPJ7 form").attr("value");
                    if(wh.show_status==undefined||wh.show_status==$(".fanPJ7 span").attr("value")){wh.show_status=0};
                    wh.platform_status=$(".wezi .Dis").find("span").attr("value");
                    if(wh.platform_status	==undefined){swal({title:"你有操作未完成！！", text:"请完成操作后再提交。", type:"info", showCancelButton: false, allowEscapeKey:true, allowOutsideClick:true, closeOnConfirm: false, confirmButtonColor: "#DD6fff"
                    });return};
                    wh.girl_id=Qid;
            
//                  TJ_ajax(address1+"/admin/GirlProfessionAuth/setGirlPlatformAuth","#myModalNv-WH",wh);
                    comiteCace_other(wh, address1 + "/admin/GirlProfessionAuth/setGirlPlatformAuth", "#myModalNv-WH");
                })
            }
            //女模特审核---------------提交
            function Nv_zhiye(){
                $(".Nv_zhiye_TJ").unbind("click").on("click",function () {
                    var sf={};
                    sf.show_status=$(".fanPJ6 form").attr("value");     if(sf.show_status==undefined||sf.show_status==$(".fanPJ6 span").attr("value")){sf.show_status=0};
                    sf.model_status=$(".fanZY .Dis").find("span").attr("value");
                    if(sf.model_status==undefined){swal({title:"你有操作未完成！！", text:"请完成操作后再提交。", type:"info", showCancelButton: false, allowEscapeKey:true, allowOutsideClick:true, closeOnConfirm: false, confirmButtonColor: "#DD6fff"
                    });return};
                    sf.girl_id=Qid;
//                  TJ_ajax(address1+"/admin/girlProfessionAuth/setGirlModelAuth","#myModalNv-ZY",sf);
                      comiteCace_other(sf, address1 + "/admin/girlProfessionAuth/setGirlModelAuth", "#myModalNv-ZY");
                });
            }
            //女白领审核---------------提交
            function Nv_bailing(){
                $(".Nv_bailing").unbind("click").on("click",function () {
                    var bl={};
                    bl.auth_type=$(".bailName").attr("value");
                    bl.show_status=$(".fanPJ8 form").attr("value");     if(bl.show_status==undefined||bl.show_status==$(".fanPJ8 span").attr("value")){bl.show_status=0};
                    bl.professi_status=$(".wezi-1 .Dis").find("span").attr("value");
                    if(bl.professi_status==undefined){swal({title:"你有操作未完成！！", text:"请完成操作后再提交。", type:"info", showCancelButton: false, allowEscapeKey:true, allowOutsideClick:true, closeOnConfirm: false, confirmButtonColor: "#DD6fff"
                    });return};
                    bl.girl_id=Qid;
//                  TJ_ajax(address1+"/admin/GirlProfessionAuth/setProfessiAuth","#myModalNv-BL",bl);
                     comiteCace_other(bl, address1 + "/admin/GirlProfessionAuth/setProfessiAuth", "#myModalNv-BL");
                })
            }
            //男头像审核---------------提交
            function NANTOUXIANG(){
                $(".TJ-Ntouxian").unbind("click").on("click",function () {
                    var Ntij={};
                    var n1=$(".Nfannic .Dis").find("span").attr("value");
                    var n2= $(".NfangTS-new .Dis").find("span").attr("value");
                    var n3=$(".NfanPJ form").attr("value");
                    if(n3==$(".NfanPJ span").attr("value")){
                        n3=0
                    };
                    if(n3 == undefined){ swal("请选择状态"); return};
                    if(n1==undefined) {n1=0};  if(n2==undefined) {swal("请审核头像！！");return};
                    if($(".Nan-xfasongiaox").hasClass("btn-success")){Ntij.xiaox="发送消息"}else{Ntij.xiaox="不发送消息"};
                    Ntij.boy_nick_state=n1;Ntij.boy_head_state=n2;Ntij.show_status=n3;Ntij.boy_id=Qid;
//                  TJ_ajax(address1+"/admin/BoyReview/setBoyHeadAuth","#myModal78",Ntij);
                      comiteCace_other(Ntij,address1+"/admin/BoyReview/setBoyHeadAuth","#myModal78");
                });
            };
            //男相册审核-----------------提交
            function Nan_xiangce(){
                $(".Nan_xiangce_TJ").unbind("click").on("click",function () {
                    var ss={},tt=new Array(),yy=new  Array(),oo=[], len1=$(".NfanTX2 .zhaopdiv1 .Dis").length, len2=$(".NfanTX2 .zhaopdiv2 .Dis").length;
                    var uu=new Array(),len=$(".NfanTX2  .Dis").length;
                    ss.boy_id=Qid; ss.show_status=$(".NfanPJ2 form").attr("value");
                    for(var i=0;i<len1;i++){
                        tt[i]={photo_id:$(".NfanTX2 .zhaopdiv1 .img_id").eq(i).text(),is_check:$(".Nan_zhaopian1").eq(i).find("span").attr("value")};
                    };

                    for(var j=0;j<len2;j++){
                        yy[j]={photo_id:$(".NfanTX2 .zhaopdiv2 .img_id").eq(j).text(),is_check:$(".Nan_zhaopian2").eq(j).find("span").attr("value")};
                    };
                    //判断哪张没审核
                    for(var a=0;a<len;a++){
                        uu[a] ={photo_id:$(".NfanTX2 .img_id").eq(a).text(),is_check:$(".Nan_zhaopian").eq(a).find("span").attr("value")};
                    };

                    for(var c=0;c<uu.length;c++){
                        if(uu[c].is_check==undefined){oo.push(c+1)}
                    };
                    if(oo.length>=1){
                        swal({
                            title:"你有操作未完成！！",
                            text:"第"+oo+"张没有审核！！",
                            type:"info",
                            showCancelButton: false,
                            allowEscapeKey:true,
                            allowOutsideClick:true,
                            closeOnConfirm: false,
                            confirmButtonColor: "#DD6fff"
                        })
                        }else{
                        ss.public_photo=tt;ss.private_photo=yy;
                   
                    //判断没有操作或者操作的状态和之前一样的时候    show_status=0
                    if(ss.show_status==undefined||ss.show_status==$(".NfanPJ2 span").attr("value")){ss.show_status=0};
                    comiteCace(ss,address1+"/admin/BoyReview/setPhotoAuth","#myModal101");
                        }
               
          
                    	 

                })
            };
            //男视频审核------------提交
            function Nan_shipin(){
                $(".Nan_shipin_TJ").unbind("click").on("click",function () {
                    var ss_1={};
                    var ss_text=$(".NfanSP .Dis").find("span").attr("value");
                    ss_1.show_status=$(".NfanPJ3 form").attr("value");
                    if(ss_1.show_status==undefined||ss_1.show_status==$(".NfanPJ3 span").attr("value")){ss_1.show_status=0};
                    if(ss_text==undefined){swal("请审核！！");return};
                    ss_1.video_status=ss_text;ss_1.boy_id=Qid;
//                  TJ_ajax(address1+"/admin/BoyReview/setVideoAuth","#myModal102",ss_1);
                      comiteCace_other(ss_1,address1+"/admin/BoyReview/setVideoAuth","#myModal102");
                });
            };
            //男语音---------------提交
            function Nan_yuyin(){
                $(".Nan_yuyin").unbind("click").on("click",function () {
                    var o={};
                    o.voice_status=$(".NfanYY .Dis").find("span").attr("value");
                    o.show_status=$(".NfanPJ4 form").attr("value");
                    if(o.show_status==undefined||o.show_status==$(".NfanPJ4 span").attr("value")){o.show_status=0};
                    if(o.voice_status==undefined){swal("请审核！！");return};
                    o.boy_id=Qid;
//                  TJ_ajax(address1+"/admin/BoyReview/setVoiceAuth","#myModal103",o);
                     comiteCace_other(o,address1+"/admin/BoyReview/setVoiceAuth","#myModal103");
                });
            }
            //男身份证审核------------提交
            function  Nan_shenfenzheng(){
                $(".Nan_shengfenzheng").unbind("click").on("click",function () {
                    var strt={};
                    strt.idcard_status=$(".NfanTX5 ,Dis").find("span").attr("value");
                    strt.show_status=$(".NfanPJ5 form").attr("value");
                    if(strt.show_status==undefined||strt.show_status==$(".NfanPJ5 span").attr("value")){strt.show_status=0};
                    if(strt.idcard_status==undefined){swal("请审核！！！");return};
                    strt.boy_id=Qid;
//                  TJ_ajax(address1+"/admin/BoyReview/setBoyIdCard","#myModal104",strt);
                    comiteCace_other(strt,address1+"/admin/BoyReview/setBoyIdCard","#myModal104");
                });
            };
            //男车辆认证审核------------提交
            function  Nan_zhiye(){
                $(".Nan_zhiye-TJ").unbind("click").on("click",function () {
                    var strt={};
                    strt.vehicle_status=$(".NfanTX6 .Dis").find("span").attr("value");
                    strt.show_status=$(".NfanPJ6 form").attr("value");
                    if(strt.show_status==undefined||strt.show_status==$(".NfanPJ6 span").attr("value")){strt.show_status=0}
                    if(strt.vehicle_status==undefined){swal("请审核！！！");return};
                    strt.boy_id=Qid;
//                  TJ_ajax(address1+"/admin/BoyReview/setBoyVehicleAuth","#myModal105",strt);
                     comiteCace_other(strt,address1+"/admin/BoyReview/setBoyVehicleAuth","#myModal105");
                });
            }


            // 审核头像视频按钮
            function ifShow(){
                var head_value,face_value;
                $(".TXbutongguo1").unbind("click").on("click",function () {
                    $(this).parent().prev().find(".Dis").css({"display":"block","background":"red"}).html("<span>未通过</span>").children("span").attr("value","3");
                    head_value=$(".fangTS7m .Dis").children("span").text();
                    face_value=$(".fanTuP7m .Dis").children("span").text();
                    jian2(head_value,face_value);
                });
                $(".TXbutongguo2").unbind("click").on("click",function () {
                    $(this).parent().prev().find(".Dis").css({"display":"block","background":"green"}).html("<span>通过</span>").children("span").attr("value","2");
                    head_value=$(".fangTS7m .Dis").children("span").text();
                    face_value=$(".fanTuP7m .Dis").children("span").text();
                    jianting(head_value,face_value);
                });
                //判断是否显示状态选项
                function jianting(value1,value2){
                    if(value1=="通过"&&value2=="通过"){
                        $(".fanPJ70").addClass("addDisplay").removeClass("car-hide");
                    }
                }
                function jian2(vau1,value2){
                    if(vau1=="未通过"||value2=="未通过"){
                        $(".fanPJ70").addClass("car-hide").removeClass("addDisplay");
                    }
                }
            }
            // 审核头像视频按钮     END
            //判断状态是否为空
            function Istrue(){
                if($(".fanPJ70").css("display")=="block"&&$(".fanPJ70 label").hasClass("select")||$(".fanPJ70").css("display")=="none"){
                    //在显示的时候 要有选中状态 或者隐藏
                    return false
                }else{
                    return true
                }
            }

            //初始化 弹出的内容为空
            function chushihua(){
                //女审核初始化

                $(".fangTS").html(null); $(".fanTuP").html(null); $(".fanSP").html(null); $(".fanPJ").html(null);  $(".fanTJ").html(null);$(".fanNC").html(null);
                $(".fangTS1").html(null); $(".fanTuP1").html(null); $(".Nv_newTX").html(null);$(".fanTJ1").html(null);$(".zhaopdiv").html(null);$(".fanPJ1").html(null);
                $(".fangTS2").html(null); $(".fanTuP2").html(null); $(".fanTup22").html(null);  $(".fanTJ2").html(null);$(".fanPJ2").html(null);
                $(".fangTS3").html(null); $(".fanTuP3").html(null); $(".fanSP3").html(null);  $(".fanTJ3").html(null);$(".fanPJ3").html(null);
                $(".fangTS4").html(null); $(".fanTuP4").html(null); $(".fanYY").html(null);  $(".fanTJ4").html(null);$(".fanPJ4").html(null);
                $(".fangTS5").html(null); $(".fanTuP5").html(null); $(".fanSFZ").html(null);  $(".fanTJ5").html(null);$(".fanPJ5").html(null);
                $(".fangTS6").html(null); $(".fanTuP6").html(null); $(".moadal-img").html(null);  $(".fanTJ6").html(null);$(".wezi").html(null);$(".bailing").html(null);$(".fanPJ6").html(null);
                $(".fangTS7").html(null); $(".fanTuP7").html(null);  $(".fanPJ70").html(null);  $(".fanTJ7").html(null);$(".fanTuP7m").html(null);$(".fangTS7m").html(null);$(".fanPJ7").html(null);
                $(".fangTS-7").html(null);$(".fanTuP-7").html(null);$(".wezi-1").html(null);$(".fanTJ-7").html(null);$(".fanTJ-8").html(null);
                $(".fangTS-8").html(null);$(".fanTuP-8").html(null);$(".fanPJ8").html(null);
                //男审核初始化
                $(".NfangTS").html(null);  $(".NfanPJ").html(null);   $(".NfanTJ").html(null);$(".NfangTS-ord").html(null);$(".NfangTS-new").html(null);$(".Nfannic").html(null);$(".Nan-xfasongiaox").removeClass("btn-success");
                $(".NfangTS1").html(null);  $(".NfanTX").html(null);$(".NfanTJ1").html(null);$(".zhaopdiv").html(null);
                $(".NfangTS2").html(null);  $(".NfanTX2").html(null);  $(".NfanTJ2").html(null);$(".NfanTX3").html(null);$(".NfanPJ2").html(null);
                $(".NfangTS3").html(null); $(".NfanSP3").html(null); $(".NfanSP").html(null); $(".NfanTJ3").html(null);$(".NfanPJ3").html(null);
                $(".NfangTS4").html(null);$(".NfanYY").html(null); $(".NfanTX4").html(null); $(".NfanTJ4").html(null);$(".NfanPJ4").html(null);
                $(".NfangTS5").html(null); $(".NfanTX5").html(null);  $(".NfanTJ5").html(null);$(".NfanPJ5").html(null);
                $(".NfangTS6").html(null); $(".NfanTX6").html(null);  $(".NfanTJ6").html(null);$(".NfanPJ6").html(null);
            }
        })
    })
};

// 女审核
ajaxF(".XtouXiang6",address1+"/admin/GirlReview/getGirlHeadAuth","gilr");//新用户未通过审核
ajaxF(".XtouXiang0",address1+"/admin/GirlReview/getGirlHeadAuth","gilr");//头像
ajaxF(".XtouXiang1",address1+"/admin/GirlReview/getPhotoAuth","gilr");//相册
ajaxF(".XtouXiang2",address1+"/admin/GirlReview/getVideoAuth","gilr");//视频
ajaxF(".XtouXiang3",address1+"/admin/GirlReview/getVoiceAuth","gilr");//语音
ajaxF(".XtouXiang4",address1+"/admin/GirlReview/getIdCardAuth","gilr");//身份证
ajaxF(".XtouXiang5",address1+"/admin/girlProfessionAuth/getGirlModelAuth","gilr");//职业---模特
ajaxF(".XtouXiang7",address1+"/admin/GirlProfessionAuth/getGirlPlatformAuth","gilr");//职业---网红
ajaxF(".XtouXiang8",address1+"/admin/GirlProfessionAuth/getProfessiAuth","gilr");//职业---白领
// 男审核
ajaxF(".NXtouXiang",address1+"/admin/BoyReview/getBoyHeadAuth","boy");//新用户
//ajaxF(".NXtouXiang0",address1+"/admin/BoyReview/getPhotoAuth");//头像
ajaxF(".NXtouXiang1",address1+"/admin/BoyReview/getPhotoAuth","boy");//相册
ajaxF(".NXtouXiang2",address1+"/admin/BoyReview/getVideoAuth","boy");//视频
ajaxF(".NXtouXiang3",address1+"/admin/BoyReview/getVoiceAuth","boy");//语音
ajaxF(".NXtouXiang4",address1+"/admin/BoyReview/getIdCardAuth","boy");//身份证
ajaxF(".NXtouXiang5",address1+"/admin/BoyReview/getBoyVehicleAuth","boy");//车辆认证

//昵称页面
$(".nichen").click(function(){
    $(".Nv_biaoti").text($(this).text());
    //address1+"/admin/auth/getGirlNick"
    var nichen_show=[
        {data: "create_time"},
        {data: function(obj){
        	var imgleng = obj.head_img.length;
        	if (imgleng > 55) {
        		 $TX="<a href='Javascript:;'  class='userData' data-toggle='modal' data-target='#myModal500' ><img width='80px' height='80px' src='"+obj.head_img+"'  alt='无头像'/>" +
                "<small style='display: none'>g"+obj.girl_id+"</small></a>";
                return $TX;
        	}else{
        		$TXtext = "<a href='Javascript:;'  class='userData' data-toggle='modal' data-target='#myModal500' >无头像 <small style='display: none'>g"+obj.girl_id+"</small></a>";
        		return $TXtext
        	}
           
        }},
        {data: "nick"},
        {data: function(){
            $nichen="<div><a href='Javascript:;' class='btn btn-small nichenTG' style='margin-right: 5px;padding: 5px 12px;' value='2'>通过</a><a href='Javascript:;'  class='btn btn-small nichenNTG' style='margin-left: 5px;padding: 5px' value='3'>不通过</a></div>";
            return  $nichen;
        }},
        {data:function(){
            $CCC="<div><button class='btn btn-small NCtijiao'>提交</button></div>";
            return $CCC;
        }}
    ]
    Data_table("#example20",address1+"/admin/auth/getGirlNick",nichen_show,false);
})
$(".Nannichen").click(function(){
    $(".Nv_biaoti").text($(this).text());
    var nichen_show1=[
        {data: "create_time"},
        {data: function(obj){
        	var imgleng = obj.head_img.length;
        	if (imgleng > 55) {
            $TX="<a href='Javascript:;'  class='userData' data-toggle='modal' data-target='#myModal500' ><img width='80px' height='80px' src='"+obj.head_img+"' alt='无头像'/>" +
                "<small style='display: none'>b"+obj.boy_id+"</small></a>";
            return $TX;
            }else{
            	$TXtext = "<a href='Javascript:;'  class='userData' data-toggle='modal' data-target='#myModal500' >无头像 <small style='display: none'>b"+obj.boy_id+"</small></a>";
        		return $TXtext
        	}
        }},
        {data: "nick"},
        {data: function(){
            $nichen="<div><a href='Javascript:;' class='btn btn-small nichenTG' style='margin-right: 5px;padding: 5px 12px;' value='2'>通过</a><a href='Javascript:;'  class='btn btn-small nichenNTG' style='margin-left: 5px;padding: 5px' value='3'>不通过</a></div>";
            return  $nichen;
        }},
        {data:function(){
            $CCC="<div><button class='btn btn-small NCtijiao1'>提交</button></div>";
            return $CCC;
        }}
    ]
    Data_table("#example20",address1+"/admin/auth/getBoyNick",nichen_show1,false);
})

//昵称审查------提交
$("#example20").ajaxComplete(function(){
    //选择通过
    $(".nichenTG").unbind("dblclick").click(function(){
        var ttt = $(this).attr("value");
        $(this).css({"background-color":"orangered"}).siblings().css({"background-color":"#e8e8e8"});
        $(this).parent().parent().next().find("button").attr("value",ttt);
    });
    //选择不通过
    $(".nichenNTG").unbind("dblclick").click(function(){
        var zzz=$(this).attr("value");
        $(this).css({"background-color":"orangered"}).siblings().css({"background-color":"#e8e8e8"});
        $(this).parent().parent().next().find("button").attr("value",zzz);
    });
    //女-------------提交
    $(".NCtijiao").click(function(){
        var nic ={};
         var stm =  $(this).parent().parent().parent().children().eq(1).find("small").text();
         
        nic.girl_id = parseInt(stm.substring(1));
        nic.girl_nick_state =$(this).attr("value");
        if(nic.girl_nick_state==undefined||nic.girl_nick_state==""){swal("请审核！！");return};
        console.log(nic)
        $.ajax({
            type: 'POST',
            url: address1+"/admin/auth/setGirlNick",
            data: nic,
            success: function(data){
                if(data.code==1){

                    var table = $('#example20').DataTable();
                    table.ajax.reload();
                    swal("操作成功!", "", "success");
                }else{
                    swal(data.data+data.msg)
                }
            },
            error:function(){
                swal("请求失败");
            }
        });

    });
    //男-------------提交
    $(".NCtijiao1").click(function(){
        var nic ={};
        var stm =  $(this).parent().parent().parent().children().eq(1).find("small").text();
        nic.boy_id = parseInt(stm.substring(1));
        nic.boy_nick_state =$(this).attr("value");
        if(nic.boy_nick_state==undefined||nic.boy_nick_state==""){swal("请审核！！");return};
        $.ajax({
            type: 'POST',
            url: address1+"/admin/auth/setBoyNick",
            data: nic,
            success: function(data){
                if(data.code==1){

                    var table = $('#example20').DataTable();
                    table.ajax.reload();
                    swal("操作成功!", "", "success");
                }else{
                    swal(data.data+data.msg)
                }
            },
            error:function(){
                swal("请求失败");
            }
        });

    })
})